<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
<link href="" rel="stylesheet" type="text/css" />
<style type="text/css">
	
</style>
</head>
<body>

<input type="text" id="input"/>

<script>
let obj={};
let temp={};
//let cur = document.getElementById('input')
Object.defineProperty(obj,'name',{
	get(){
		return temp['name']
	},
	set(val){
		temp['name'] = val;
		input.value = val;
	}
});
input.value = obj.name;
input.addEventListener('input',function(){
	obj.name = this.value;
})

</script>
</body>
</html>
